package com.dabai.iot.mqtt.config;

import com.dabai.iot.mqtt.server.processor.MessageToDeviceProcessor;
import com.dabai.iot.mqtt.server.processor.MessageToServerProcessor;
import com.dabai.iot.mqtt.util.MqttMessageUtil;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 批量处理配置
 *
 * @author kev1n
 */
@Configuration(proxyBeanMethods = false)
public class MqttTaskConfiguration {

    @Bean
    public MessageToDeviceProcessor messageToDeviceProcessor(MqttMessageUtil mqttMessageUtil) {
        return new MessageToDeviceProcessor(mqttMessageUtil);
    }

    @Bean
    public MessageToServerProcessor messageToServerProcessor(MqttMessageUtil mqttMessageUtil) {
        return new MessageToServerProcessor(mqttMessageUtil);
    }
}
